package com.whfc.mach.dto.obd;

import com.whfc.mach.constant.ObdMeasurement;
import com.whfc.mach.dto.WorkStateDTO;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @Description: OBD数据
 * @author: xugcheng
 * @version: 1.0
 * @date: 2020/9/25 18:09
 */
@Data
@Measurement(name = ObdMeasurement.MEASUREMENT, database = ObdMeasurement.DATABASE, retentionPolicy = ObdMeasurement.RETENTION_POLICY, timeUnit = TimeUnit.SECONDS)
public class AppDeviceObdLogDTO extends WorkStateDTO implements Serializable {

    /**
     * 硬件时间
     */
    private Date time;

    /**
     * 服务器时间
     */
    private Date createTime;

    /**
     * 硬件时间
     */
    @Column(name = "time")
    private Instant deviceTime;

    /**
     * 服务器时间
     */
    @Column(name = "serverTime")
    private Long serverTime;

    @Column(name = "machId", tag = true)
    private String machId;

    @Column(name = "deviceId", tag = true)
    private String deviceId;

    /**
     * 硬件状态
     */
    @Column(name = "status")
    private Integer status;

    /**
     * 工作状态
     */
    @Column(name = "workState")
    private Integer workState;

    /**
     * 网络状态
     */
    @Column(name = "netState")
    private Integer netState;

    /**
     * 总油耗
     */
    @Column(name = "totalOilWear")
    private Double totalOilWear;

    /**
     * 总里程1
     */
    @Column(name = "totalLength1")
    private Long totalLength1;

    /**
     * 总里程2
     */
    @Column(name = "totalLength2")
    private Long totalLength2;

    /**
     * 电量
     */
    @Column(name = "batteryPower")
    private Integer batteryPower;

    /**
     * 电池状态
     */
    @Column(name = "batteryState")
    private Integer batteryState;

    /**
     * 主版本号
     */
    @Column(name = "masterVer")
    private String masterVer;

    /**
     * 发动机转速
     */
    @Column(name = "engineSpeed")
    private Double engineSpeed;

    @Column(name = "speed1")
    private Double speed1;

    @Column(name = "speed2")
    private Double speed2;

    @Column(name = "speed3")
    private Double speed3;

    @Column(name = "speed4")
    private Double speed4;

    /**
     * 经度
     */
    @Column(name = "lng")
    private Double lng;

    /**
     * 纬度
     */
    @Column(name = "lat")
    private Double lat;

    /**
     * 经度
     */
    @Column(name = "lngWgs84")
    private Double lngWgs84;

    /**
     * 纬度
     */
    @Column(name = "latWgs84")
    private Double latWgs84;

    /**
     * 地址
     */
    @Column(name = "location")
    private String location;

    /**
     * 帧数据
     */
    @Column(name = "frameData101")
    private String frameData101;

    /**
     * 帧数据
     */
    @Column(name = "frameData111")
    private String frameData111;

    /**
     * 帧数据
     */
    @Column(name = "frameData112")
    private String frameData112;

    /**
     * 帧数据
     */
    @Column(name = "frameData113")
    private String frameData113;

    /**
     * 帧数据
     */
    @Column(name = "frameData114")
    private String frameData114;

    /**
     * 帧数据
     */
    @Column(name = "frameData115")
    private String frameData115;

    /**
     * 帧数据
     */
    @Column(name = "frameData116")
    private String frameData116;

    /**
     * 帧数据
     */
    @Column(name = "frameData131")
    private String frameData131;

    /**
     * 帧数据
     */
    @Column(name = "frameData132")
    private String frameData132;

    /**
     * 帧数据
     */
    @Column(name = "frameData133")
    private String frameData133;

    /**
     * 帧数据
     */
    @Column(name = "frameData134")
    private String frameData134;

    /**
     * 帧数据
     */
    @Column(name = "frameData135")
    private String frameData135;

    /**
     * 帧数据
     */
    @Column(name = "frameData136")
    private String frameData136;

    /**
     * 帧数据
     */
    @Column(name = "frameData151")
    private String frameData151;

    /**
     * 帧数据
     */
    @Column(name = "frameData152")
    private String frameData152;

    /**
     * 帧数据
     */
    @Column(name = "frameData153")
    private String frameData153;

    /**
     * 帧数据
     */
    @Column(name = "frameDataCF00400")
    private String frameDataCF00400;

    @Column(name = "frameDataCF00300")
    private String frameDataCF00300;

    @Column(name = "frameData18FEDF00")
    private String frameData18FEDF00;

    @Column(name = "frameData18FEF500")
    private String frameData18FEF500;

    @Column(name = "frameData18FEF100")
    private String frameData18FEF100;

    @Column(name = "frameData18ECFF00")
    private String frameData18ECFF00;

    @Column(name = "frameData18EBFF00")
    private String frameData18EBFF00;

    @Column(name = "frameData18FEEE00")
    private String frameData18FEEE00;

    @Column(name = "frameData18FEF200")
    private String frameData18FEF200;

    @Column(name = "frameData18FEEF00")
    private String frameData18FEEF00;

    @Column(name = "frameData18FEE900")
    private String frameData18FEE900;

    @Column(name = "frameData18FECA00")
    private String frameData18FECA00;

    @Column(name = "frameData18FEF600")
    private String frameData18FEF600;

    @Column(name = "frameData18FEF700")
    private String frameData18FEF700;

    @Column(name = "frameData18FEE500")
    private String frameData18FEE500;

    @Column(name = "frameData18FEE400")
    private String frameData18FEE400;

    @Column(name = "frameData18FEBD00")
    private String frameData18FEBD00;

    @Column(name = "frameData18FEE000")
    private String frameData18FEE000;

    @Column(name = "frameData18FF0800")
    private String frameData18FF0800;

    @Column(name = "frameData18FEFF00")
    private String frameData18FEFF00;

    @Column(name = "frameData18F0010B")
    private String frameData18F0010B;

    @Column(name = "frameDataCF00203")
    private String frameDataCF00203;

    @Column(name = "frameData18F00503")
    private String frameData18F00503;

    @Column(name = "frameData18FE4A03")
    private String frameData18FE4A03;

    @Column(name = "frameData18FEF121")
    private String frameData18FEF121;

    @Column(name = "frameDataCFE6CEE")
    private String frameDataCFE6CEE;

    @Column(name = "frameDataC00000B")
    private String frameDataC00000B;

    @Column(name = "frameDataC000F0B")
    private String frameDataC000F0B;

    @Column(name = "frameDataC000024")
    private String frameDataC000024;

    @Column(name = "frameDataC000003")
    private String frameDataC000003;

    @Column(name = "frameDataC000F03")
    private String frameDataC000F03;

    @Column(name = "frameDataC000021")
    private String frameDataC000021;

    @Column(name = "frameDataC000F21")
    private String frameDataC000F21;

    @Column(name = "frameDataCFF0431")
    private String frameDataCFF0431;

    @Column(name = "frameData18E00021")
    private String frameData18E00021;

    /**
     * 牵引力
     */
    @Column(name = "force")
    private Double force;

    /**
     * 1轮张力
     */
    @Column(name = "tension1")
    private Double tension1;

    /**
     * 2轮张力
     */
    @Column(name = "tension2")
    private Double tension2;
}
